﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Members_Home" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <style type="text/css">
    body
    {
      font-size: 12px;
    }
    .navigator-bar td
    {
      width: 150px;
      text-align: center;
    }
  </style>
</head>
<body id="UserHome" style="margin: 20px;">
  <asp:Label Font-Names="Arial" Font-Size="25pt" ID="Name" runat="server"><%=AccountContext.CurrentAccount.Name %></asp:Label>
  <hr />

  <table border="0" cellpadding="10" cellspacing="0" class="navigator-bar">
    <tr>
      <td><asp:HyperLink runat="server" ID="AttachedTopicsLinkItem" NavigateUrl="Home.aspx?view=AttachedTopics">我参与的话题(%)</asp:HyperLink></td>
      <td><asp:HyperLink runat="server" ID="LaunchedTopicsLinkItem" NavigateUrl="Home.aspx?view=LaunchedTopics">我发起的话题(%)</asp:HyperLink></td>
    </tr>
  </table>

  <table id="AttachedTopicsList" class="topicList" border="1" cellpadding="3" cellspacing="0">
    <thead>
      <tr>
        <td colspan="2" style="height: 20px;">标题</td>
        <td>作者</td>
        <td>回帖</td>
        <td><span id="LastPublishButton" style="cursor: pointer; color: #999999;" onclick="showLastPublish();">最后发表</span>&nbsp;/&nbsp;<span id="LastModifyButton" style="cursor: pointer; color: #999999;" onclick="showLastModify();">最后修改</span></td>
      </tr>
    </thead>
    <asp:Repeater runat="server" ID="TopicList" DataSource='<%#WebCommunityContext.Current.BlogSystem.ProfilerViewService.GetAttatchedTopics() %>'>
      <ItemTemplate>
        <xc:Presenter ID="Presenter1" runat="server" View="<%#Page.GetDataItem() %>">
          <tr>
            <td class="icon"><a title="新窗口打开" target="_blank"><asp:Image ID="Image1" runat="server" ImageUrl="~/images/topic_common.gif" BorderWidth="0" /></a></td>
            <td class="title"><a><%#Container.EvalView( "Title", "{0}", false )%></a></td>
            <td class="launcher"><a href="MemberView.aspx?Username=<%#Container.EvalView("Launcher") %>"><%#Container.EvalView("Launcher") %></a></td>
            <td class="numbers"><%#Container.EvalView("Responses") %></td>
            <td class="lastpost-container">
              <div class="last-publish" style="display: none;"><span class="date"><%#Container.EvalView( "LastPostPublishDate", "{0:yyyy-MM-dd HH:mm}" )%></span> by <a class="member-link" href="MemberView.aspx?Username=<%#Container.EvalView("LastPublishPostAuthor") %>"><%#Container.EvalView( "LastPublishPostAuthor" )%></a></div>
              <div class="last-modify" style="display: none;"><span class="date"><%#Container.EvalView( "LastPostModifyDate", "{0:yyyy-MM-dd HH:mm}" )%></span> by <a class="member-link" href="MemberView.aspx?Username=<%#Container.EvalView("LastModifyPostAuthor") %>"><%#Container.EvalView( "LastModifyPostAuthor" )%></a></div>
            </td>
          </tr>
        </xc:Presenter>
      </ItemTemplate>
    </asp:Repeater>
  </table>

</body>
</html>
